﻿CREATE PROCEDURE BILL.InsertBill
	@customerId INT = NULL,

    @datetime DATETIME = NULL,
	@pay FLOAT = NULL,

	@checkValidation BIT = NULL
AS
BEGIN
	DECLARE @id INT

	EXEC BILL.InsertBillInternal
		@customerId = @customerId,
		@datetime = @datetime,
		@pay = @pay,
		@id = @id OUTPUT,
		@checkValidation = @checkValidation

	SELECT Id = @id
END

GO
GRANT EXECUTE
    ON OBJECT::BILL.InsertBill TO [BillingAdmin]
    AS [dbo];